From b2af13f123a09e3a410efd879549dde3eef21463 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 19 May 2006 16:04:32 +0000 Subject: [PATCH] Fix a boundary case in scrolling where a tab was not shown. (#168105, 2006-05-19 Matthias Clasen * gtk/gtknotebook.c (gtk_notebook_pages_allocate): Fix a boundary case in scrolling where a tab was not shown. (#168105, Hiroyuki Ikezoe, patch by Kouhei Sutou) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtknotebook.c | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cc681e4fa3..e5a4786936 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-19 Matthias Clasen + + * gtk/gtknotebook.c (gtk_notebook_pages_allocate): Fix a + boundary case in scrolling where a tab was not shown. (#168105, + Hiroyuki Ikezoe, patch by Kouhei Sutou) + 2006-05-19 Damon Chaplin * gtk/gtkfontsel.c (gtk_font_selection_init): use diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cc681e4fa3..e5a4786936 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-05-19 Matthias Clasen + + * gtk/gtknotebook.c (gtk_notebook_pages_allocate): Fix a + boundary case in scrolling where a tab was not shown. (#168105, + Hiroyuki Ikezoe, patch by Kouhei Sutou) + 2006-05-19 Damon Chaplin * gtk/gtkfontsel.c (gtk_font_selection_init): use diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index dfef203d6c..12a85bc74b 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4851,7 +4851,9 @@ gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook, &(notebook->first_tab), remaining_space, STEP_PREV); - if (*remaining_space <= 0) + page = notebook->focus_tab->data; + if (*remaining_space <= 0 && + !gtk_widget_get_child_visible(page->tab_label)) { notebook->first_tab = gtk_notebook_search_page (notebook, notebook->first_tab, -- 2.30.2